package com.zsy.provider.api.service;


import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.zsy.base.bean.DemoResult;
import com.zsy.dao.model.CgsDksq;
import com.zsy.dao.model.TbPermission;
import com.zsy.dao.model.TbUser;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.math.BigDecimal;
import java.util.List;

/**
 * 用户权限中心服务
 */
public interface UacService {

    @PostMapping("/api/uac/listCgsDksq")
    DemoResult<Page<CgsDksq>> listCgsDksq(@RequestBody(required=false) JSONObject jsonObject);
    /**
     * 获取用户列表
     * @return
     */
    @PostMapping("/api/uac/listUser")
    DemoResult<Object> listUser(@RequestBody(required=false) String id);
    /**
     * @Author zhaoshouyun
     * @Description  获取用户信息
     * @Date 2020-04-15 05:15
     * @Param userName
     * @return com.zsy.base.bean.DemoResult<java.lang.Object>
     **/
    @PostMapping("/api/uac/getUserByUserName")
    DemoResult<TbUser> getUserByUserName(@RequestBody String userName);
    /**通过用户名更新用户手机号，为了测试事务
     * @Author zhaoshouyun
     * @Description
     * @Date 2020-04-29 01:55
     * @Param userName
     * @Param phone
     * @return com.zsy.base.bean.DemoResult<com.zsy.dao.model.TbUser>
     **/
    @PostMapping("/api/uac/updateUserByUserName")
    DemoResult<TbUser> updateUserByUserName(@RequestBody String userName, @RequestParam("phone") String phone);
    /**获取权限列表
     * @Author zhaoshouyun
     * @Description
     * @Date 2020-04-15 05:36
     * @Param id
     * @return com.zsy.base.bean.DemoResult<com.zsy.dao.oauth2.model.TbPermission>
     **/
    @PostMapping("/api/uac/selectPermissionsByUserId")
    DemoResult<List<TbPermission>> selectPermissionsByUserId(@RequestBody BigDecimal id);
}
